package nu.boomboom.smartfsync.impl;

import nu.boomboom.smartfsync.IDifferences;
import nu.boomboom.smartfsync.IFileSystem;

public class SyncFiles {

	private final IFileSystem comparisonTargetFileSystem;
	private final IFileSystem baseFileSystem;

	public SyncFiles(IFileSystem baseFileSystem,
			IFileSystem comparisonTargetFileSystem) {
		this.comparisonTargetFileSystem = comparisonTargetFileSystem;
		this.baseFileSystem = baseFileSystem;
	}

	public IDifferences detectDifferences() {
		return detectDifferences((DirImpl) baseFileSystem.dir(),
				(DirImpl) comparisonTargetFileSystem.dir());
	}

	public IDifferences detectDifferences(DirImpl baseDir,
			DirImpl comparisonTargetDir) {
		return DifferencesImpl.createDifferences(baseDir, comparisonTargetDir);
	}
}
